/*
 * Copyright (c) 2009 Nathaniel Houghton <nathan@brainwerk.org>
 *                    Robert Kirchgessner <rkirchge@gmail.com>
 *
 * Permission to use, copy, modify, and distribute this software for
 * any purpose with or without fee is hereby granted, provided that
 * the above copyright notice and this permission notice appear in all
 * copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
 * OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 * PERFORMANCE OF THIS SOFTWARE.
 *
 */
 
#include <stdio.h>

#include "obd_pid.h"
 
const char pid_length[] = {LEN_M0100, LEN_M0101, LEN_M0102, LEN_M0103, LEN_M0104, LEN_M0105, LEN_M0106, LEN_M0107, LEN_M0108, LEN_M0109, LEN_M010A, LEN_M010B, LEN_M010C, LEN_M010D, LEN_M010E, LEN_M010F, 
							LEN_M0110, LEN_M0111, LEN_M0112, LEN_M0113, LEN_M0114, LEN_M0115, LEN_M0116, LEN_M0117, LEN_M0118, LEN_M0119, LEN_M011A, LEN_M011B, LEN_M011C, LEN_M011D, LEN_M011E, LEN_M011F, 
							LEN_M0120, LEN_M0121, LEN_M0122, LEN_M0123, LEN_M0124, LEN_M0125, LEN_M0126, LEN_M0127, LEN_M0128, LEN_M0129, LEN_M012A, LEN_M012B, LEN_M012C, LEN_M012D, LEN_M012E, LEN_M012F,
							LEN_M0130, LEN_M0131, LEN_M0132, LEN_M0133, LEN_M0134, LEN_M0135, LEN_M0136, LEN_M0137, LEN_M0138, LEN_M0139, LEN_M013A, LEN_M013B, LEN_M013C, LEN_M013D, LEN_M013E, LEN_M013F,
							LEN_M0140, LEN_M0141, LEN_M0142, LEN_M0143, LEN_M0144, LEN_M0145, LEN_M0146, LEN_M0147, LEN_M0148, LEN_M0149, LEN_M014A, LEN_M014B, LEN_M014C, LEN_M014D, LEN_M014E, LEN_M014F,
							LEN_M0150, LEN_M0151, LEN_M0152 };


const char *pid_name[] = {
	"PIDs supported",
	"Monitor status since DTCs cleared",
	"Freeze DTC",
	"Fuel System Status",
	"Engine Load",
	"Engine Coolant Temperature",
	"Short term fuel % trim - Bank 1",
	"Long term fuel % trim - Bank 1",
	"Short term fuel % trim - Bank 2",
	"Long term fuel % trim - Bank 2",
	"Fuel Pressure",
	"Intake Manifold Pressure",
	"Engine RPM",
	"Vehicle Speed",
	"Timing Advance",
	"Intake Air Temperature",
	"MAF Air Flow Rate",
	"Throttle Position",
	"Commanded Secondary Air Status",
	"Oxygen Sensors Present",
	"Bank 1, Sensor 1: Oxygen Sensor Voltage, Short Term Fuel Trim",
	"Bank 1, Sensor 2: Oxygen Sensor Voltage, Short Term Fuel Trim",
	"Bank 1, Sensor 3: Oxygen Sensor Voltage, Short Term Fuel Trim",
	"Bank 1, Sensor 4: Oxygen Sensor Voltage, Short Term Fuel Trim",
	"Bank 2, Sensor 1: Oxygen Sensor Voltage, Short Term Fuel Trim",
	"Bank 2, Sensor 2: Oxygen Sensor Voltage, Short Term Fuel Trim",
	"Bank 2, Sensor 3: Oxygen Sensor Voltage, Short Term Fuel Trim",
	"Bank 2, Sensor 4: Oxygen Sensor Voltage, Short Term Fuel Trim",
	"OBD Standard",
	"Oxygen Sensors Present",
	"Auxiliary Input Status",
	"Run time since Engine Start",
	"PIDs Supported 21-40",
	"Distance traveled with Malfunction Indicator Lamp On",
	"Fuel Rail Pressure",
	"Fuel Rail Pressure (Diesel)",
	"O2S1_WR_lamda(1): Equivalence Ratio Voltage",
	"O2S2_WR_lamda(1): Equivalence Ratio Voltage",
	"O2S3_WR_lamda(1): Equivalence Ratio Voltage",
	"O2S4_WR_lamda(1): Equivalence Ratio Voltage",
	"O2S5_WR_lamda(1): Equivalence Ratio Voltage",
	"O2S6_WR_lamda(1): Equivalence Ratio Voltage",
	"O2S7_WR_lamda(1): Equivalence Ratio Voltage",
	"O2S8_WR_lamda(1): Equivalence Ratio Voltage",
	"Commanded EGR",
	"EGR Error",
	"Commanded Evaporative Purge",
	"Fuel Level Input",
	"# of Warm-ups since Codes Cleared",
	"Distance Traveled since Codes Cleared",
	"Evap. System Vapor Pressure",
	"Barometric Pressure",
	"O2S1_WR_lamda(1): Equivalence Ratio Current",
	"O2S2_WR_lamda(1): Equivalence Ratio Current",
	"O2S3_WR_lamda(1): Equivalence Ratio Current",
	"O2S4_WR_lamda(1): Equivalence Ratio Current",
	"O2S5_WR_lamda(1): Equivalence Ratio Current",
	"O2S6_WR_lamda(1): Equivalence Ratio Current",
	"O2S7_WR_lamda(1): Equivalence Ratio Current",
	"O2S8_WR_lamda(1): Equivalence Ratio Current",
	"Catalyst Temperature Bank 1, Sensor 1",
	"Catalyst Temperature Bank 2, Sensor 1",
	"Catalyst Temperature Bank 1, Sensor 2",
	"Catalyst Temperature Bank 2, Sensor 2",
	"PIDs supported 41-60",
	"Monitor Status this Drive Cycle",
	"Control Module Voltage",
	"Absolute Load Value",
	"Command Equivalence Ratio",
	"Relative Throttle Position",
	"Ambient Air Temperature",
	"Absolute Throttle Position B",
	"Absolute Throttle Position C",
	"Accelerator Pedal Position D",
	"Accelerator Pedal Position E",
	"Accelerator Pedal Position F",
	"Commanded Throttle Actuator",
	"Time Run with MIL On",
	"Time Since Trouble Codes Cleared",
	"Fuel Type",
	"Ethanol Fuel %",
	NULL
};
